package com.zhangxi.websqlit.mybatis.entity;

import com.zhangxi.websqlit.common.util.DateUtil;

import java.io.Serializable;
import java.util.Objects;

public class ChatReportEntity implements Serializable {
    private String userUuid;
    private String contactUuid;
    private String chatUuid;
    private String chatContent;
    private String modtime;

    /**
     * 聊天方向：0 本端 1对端
     */
    private Integer contactState;

    public ChatReportEntity(){

    }

    public ChatReportEntity(String modtime){
        this.modtime = modtime;
    }

    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    public String getContactUuid() {
        return contactUuid;
    }

    public void setContactUuid(String contactUuid) {
        this.contactUuid = contactUuid;
    }

    public String getChatUuid() {
        return chatUuid;
    }

    public void setChatUuid(String chatUuid) {
        this.chatUuid = chatUuid;
    }

    public String getChatContent() {
        return chatContent;
    }

    public void setChatContent(String chatContent) {
        this.chatContent = chatContent;
    }

    public String getModtime() {
        return DateUtil.formateDate(modtime);
    }
    public String getModtime1() {
        return modtime;
    }

    public void setModtime(String modtime) {
        this.modtime = modtime;
    }

    public Integer getContactState() {
        return contactState;
    }

    public void setContactState(Integer contactState) {
        this.contactState = contactState;
    }

    @Override
    public String toString() {
        return "ChatReportEntity{" +
                "userUuid='" + userUuid + '\'' +
                ", contactUuid='" + contactUuid + '\'' +
                ", chatUuid='" + chatUuid + '\'' +
                ", chatContent='" + chatContent + '\'' +
                ", modtime='" + modtime + '\'' +
                ", contactState=" + contactState +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChatReportEntity that = (ChatReportEntity) o;
        return Objects.equals(getModtime(), that.getModtime());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getModtime());
    }
}
